package com.kx.center.service;

import java.security.GeneralSecurityException;
import java.util.List;
import java.util.Map;

import com.kx.center.entity.Account;
import com.kx.center.exception.AccountAlreadyExistsException;

public interface AccountService {

	void createAccount(Account account) throws GeneralSecurityException, AccountAlreadyExistsException;
	void updateAccount(Account account);
	
	Account findAccountById(Integer id);
	Account findAccountByLoginName(String loginName);
	Account findAccountByToken(String token);
	List<Account> findAccountByDepartmentId(Integer departmentId);
	List<Account> findAccountByCompany(int pageNum,int count,Map<String,Object> whereMap);

	/**
	 * 根据登录名与密码查询用户
	 * 
	 * @param loginName
	 * @param password
	 *            明文密码
	 * @return
	 */
	Account findAccountByLoginNameAndPassword(String loginName, String password) throws GeneralSecurityException;
}
